package com.water_work_form.result;

public enum ResultCodeEnum {

    SUCCESS(0,"操作成功"),
    ERROR(1,"操作失败"),
    BIZ_ERROR(1000,"通用业务异常"),
    FILE_OUT_MAX(601,"文件超出最大限制"),
    FILE_FORMAT_ERROR(602,"文件格式不正确"),
    PARAM_ERROR(603,"参数错误"),
    JSON_FORMAT_ERROR(604,"Json解析异常"),
    SQL_ERROR(605,"Sql解析异常"),
    NETWORK_TIMEOUT(408,"请求超时"),
    UNKNOWN_INTERFACE(606,"未知的接口"),
    REQ_MODE_NOT_SUPPORTED(607,"请求方式不支持"),
    BAD_REQUEST(400,"错误请求"),
    FORBIDDEN(403,"服务器拒绝执行此请求"),
    NOT_FOUND(404,"资源不存在"),
    METHOD_NOT_ALLOWED(405,"请求方法被禁止"),
    SYS_ERROR(500,"系统异常"),
    AUTHORITY_FAILED(608,"认证失败"),
    REPEAT_INSERT(609,"重复插入"),
    LOGIN_ERROR(610, "账号密码错误或账号不存在"),
    LOGIN_SUCCESS(0,"登录成功"),
    DB_ERROR(611, "数据库异常"),
    FILE_EMPTY(613, "上传文件为空"),
    CODE_LACK(614, "该数据缺少分类编码"),
    DATA_ERROR(615, "数据有误,请检查后重新上传"),
    FORMAT_ERROR(616,"格式错误"),
    TOKEN_EXPIRED(617,"登录过期,请重新登录"),
    SIGNATURE_INVALID(618, "签名不合法");
    /**
     * 状态码
     */
    private final int code;

    /**
     * 状态信息
     */
    private final String msg;

    public int getCode(){
        return code;
    }

    public String getMsg(){
        return msg;
    }

    ResultCodeEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }
}
